<% form_for(@complaint,:html=>{:class=>"complaint_edit_new",:multipart=>true}) do |f| %>
  <%= f.error_messages %>

  <div class="wrapper">
    <div class="widget_label"><span><%= f.label "*Title" %></span></div>
    <div class="widget"><%= f.text_field :title, :size=>60 %></div>
  </div>

  <div class="wrapper">
    <div class="widget_label"><span><%= f.label "*Description" %></span></div>
    <div class="widget"><%= f.text_area :description, :cols => 69, :rows => 5 %></div>
  </div>

  <div class="wrapper">
    <div class="widget_label"><span><%= f.label "*Category" %></span></div>
    <div class="widget"><span><%= f.select :category_id, options_for_select(@all_categories)-%></span></div>
  </div>
  <div  class="wrapper">
    <div class="widget_label"><span><%= "Specify any URLs associated with your complaint" %></span></div>
    <div id="urls" class="widget" style="border:1px solid #ced6dc;padding:5px;background:#d4e2ec">
      <%= render :partial => 'url', :collection => @complaint.urls %>
    </div>
    <div style="text-align:center;"><span class="task"><%= add_url_link "Add more" %></span></div>
  </div>

  <div  class="wrapper">
    <div class="widget_label"><span><%= "Upload any Images/screenshots about your complaint" %></span></div>
    <div id="images" class="widget" style="border:1px solid #ced6dc;padding:5px;background:#d4e2ec">
      <%= render :partial => 'image', :collection => @complaint.images %>
    </div>
    <div style="text-align:center;"><span class="task"><%= add_images_link "Add more" %></span></div>
  </div>

  <div class="wrapper">
    <div class="widget_label"><%= "*Your email" %></div>
    <div class="widget">
      <% fields_for "complaint[new_complaint_user]", @complaint.user do |t| %>
        <%= t.text_field :email, :size=>33%><br/>
      <% end %>
    </div>
  </div>
  <div class="wrapper" style="margin-left:2px;font-family:verdana;font-weight:bold;">
    <%= link_to_function "Add more information", "$('more_information').toggle()" %>
  </div>
  <%= render :partial=>"more_information" ,:locals=>{:edit_mode=>false}-%>
  <div class="submit">
    <%= f.submit 'Create' %>
  </div>
  <div class="clear"></div>
<% end %>

